package Zombies;

import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.ImageIcon;
import javax.swing.JPanel;

/**
 * Autores:
 * Hugo Hiroshi Yamamura
 * Marina Coimbra Viviani
 */


/**
 * Classe: Magmar
 * Zumbi tipo fogo.
 *
 */
public class Magmar extends Zombie{
    
    private String zombie = "/Sprites/magmar.gif";;
    private int type = 1;
    
 /**
 * Construtor: Magmar
 * Constroi novo Magmar.
 */
    public Magmar(){   
    
        ImageIcon ii = new ImageIcon(this.getClass().getResource(zombie));
        this.setImage(ii.getImage());
        this.setWidth(this.getImage().getHeight(null));
        this.setHeight(this.getImage().getHeight(null));
        this.setImagew(36);
        this.setVisible(true);

       
    }
    /*
    *
    * Metodo: paint
    * Funcionamento: pinta o Magmar no JPanel.
    */
    @Override
    public void paint(Graphics g, JPanel panel){
        if(this.isVisible()){
            Graphics2D g2d = (Graphics2D)g;
            g2d.drawImage(this.getImage(), this.getX(), this.getY(), this.getX()+ this.getImagew(), this.getY() + this.getHeight(), this.getImagex(), 0, this.getImagex()+ this.getImagew(), this.getHeight(), panel);
        }
    }
    /*
    *
    * Metodo: getType
    * Funcionamento: retorna o tipo de pokemon, neste caso, tipo 1.
    */
    @Override
    public int getType(){
        return type;
    }
    
}
